<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="container">

    <p>
        {{token}}
    </p>

    <button @click="getToken">get token</button>
    <button @click="post">post</button>
</div>

<script src="https://unpkg.com/vue@next"></script>
<script src="https://cdn.jsdelivr.net/npm/axios@0.12.0/dist/axios.min.js"></script>
<script type="text/javascript">

    const demoApp = {
        data(){
            return {
                token: ''
            }
        },
        mounted(){


        },
        methods:{
            getToken(){
                axios.get('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxaab945b984f10796&secret=110b199e20831716fd3c64dc03f241c7')
                    .then(response => {
                        this.token = response.data.access_token
                    })
            },
            post(){

                this.token = '123123'
            }

        }

    }

    Vue.createApp(demoApp).mount('#container')
</script>

</body>
</html>
